package com.zg.message.sys;

import com.zg.common.core.enm.BaseEnumerator;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/7/9 15:32
 */

public enum SendStateEnum implements BaseEnumerator {
    INIT("I", "未发送"),
    SUCCESS("S", "已发送"),
    FAIL("F", "发送失败");

    private final String value;
    private final String label;

    SendStateEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getValue() {
        return value;
    }

    public static String getLabel(String value) {
        for (SendStateEnum type : SendStateEnum.values()) {
            if (type.getValue().equals(value)) {
                return type.getLabel();
            }
        }
        return "";
    }
}
